package com.chinasoft.creatway;

import org.springframework.beans.factory.FactoryBean;

public class BookFactoryBean implements FactoryBean<Book> {
    /**
     * SpringIOC容器创建bean调用的方法
     * @return 创建的javaBean
     * @throws Exception
     */
    @Override
    public Book getObject() throws Exception {
        return new Book();
    }

    /**
     * 要创建javaBean的类型
     * @return
     */
    @Override
    public Class<?> getObjectType() {
        return Book.class;
    }
}
